'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	console.log('event : ' + event)
	let apiUrl = 'https://apis.map.qq.com/ws/staticmap/v2/';
	const res = await uniCloud.httpclient.request(apiUrl,
		{
			method: 'GET',
			dataType:"json",
			data: {
				'key'	  : '3YEBZ-VTI6F-3V4JT-NCIMC-ZSA4V-Z4F4E',
				'markers' : 'color:blue|label:A|39.908823,116.397496',
				'size'  : '300*300',
				'zoom'  : '10',
				'center' : '39.12,116.54'//event.gps
			}
		});
	console.log(res)
	//event为客户端上传的参数
	console.log('event : ' + event)
	//返回数据给客户端
	return res
};
